package com.coderdream.chapter05.singleton.a1;

public class TicketMaker {
	
	private int ticket = 1000;
	
	private static TicketMaker singleton = new TicketMaker();
	
	private TicketMaker(){
		
	}
	
	public static TicketMaker getInstance() {
		return singleton;
	}
	
	public synchronized int getNextTicketNumber() {
		return ticket++;
	}

}
